<template>
<el-dialog
title="提示"
:visible.sync="deletedialogVisible"
width="30%"
:before-close="handleClose">
<span>确定删除这条日志吗？</span>
<span slot="footer" class="dialog-footer">
  <el-button style="background-color: rgb(37, 108, 155);" type="primary" @click="deletedialogVisible = false">取 消</el-button>
  <el-button style="background-color: rgb(37, 108, 155);" type="primary" @click="emitdelete()">确 定</el-button>
</span>
</el-dialog>
</template>
<script>
export default {
    data() {
      return {
        deletedialogVisible:false
      };
    },
    methods: {
      handleClose(done) {
        this.$confirm('确认关闭？')
          .then(() => {
            done();
          })
          .catch(() => {});
      },
      emitdelete(){
        this.deletedialogVisible = false;
        console.log("向父组件发送事件")
        this.$emit('confirm-delete');
      }
      }
  }
</script>